/*
 * Copyright (c) 2011 University of Tartu
 */
package org.qsardb.conversion.csv;

import org.qsardb.conversion.spreadsheet.*;

public class CsvWorksheet extends Worksheet {

	private String[][] records = null;


	public CsvWorksheet(String[][] records){
		super(null);

		this.records = records;
	}

	@Override
	public Dimension getSize(){
		int rows = this.records.length;
		int columns = (rows > 0 ? this.records[0].length : 0);

		return new Dimension(rows, columns);
	}

	@Override
	public String getValueAt(int row, int column){
		return this.records[row][column];
	}
}